<?php 
header("Content-type: text/html; charset=utf-8");


$username=$_POST["username"];
$password=$_POST["password"];
$store = include './store.php';		//留言数据库
$user_store = include './user_store.php';	//用户资料数据库

session_start();
foreach ($user_store as $key => $value) {
	if ($value["username"]==$username && $value["password"]==$password) {
		

		$_SESSION["username"]=$value["username"];



		$_SESSION["password"]=$value["password"];


		
		header("Location:./index.php");
	

		exit();
	}
};




// echo "用户名或者密码错误，请重新输入";
// echo "<p>3秒后返回登录页面</p>";

function go_login($time,$url,$word){
	include "./dist/login_error.html";
};
go_login(3,"./login.php","登录失败");




// header("refresh:3;url=login.php");







 ?>